# 补充你的代码
year = input()
month = input()
day = input()
fen = input()
print(f'{year}{fen}{month}{fen}{day}')